
// 通用渐变背景
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

Widget _buildGradientBackground({required Widget child}) {
  return Container(
    decoration: const BoxDecoration(
      gradient: LinearGradient(
        begin: Alignment.topCenter,
        end: Alignment.bottomCenter,
        colors: [Color(0xFFD6EFFF), Colors.white],
        stops: [0.0, 0.6],
      ),
    ),
    child: child,
  );
}

// 通用区块标题
Widget _buildSectionHeader(String title, [String? trailing]) {
  return Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: [
      Text(title, style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
      if (trailing != null) Text(trailing, style: const TextStyle(color: Colors.grey)),
    ],
  );
}
